package nl.haemers.ui.slider
{
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.geom.Rectangle;
	
	import nl.haemers.ui.behaviours.Draggable;
	import nl.haemers.base.BaseMovieClip;
	import nl.haemers.base.BaseSprite;
	//import nl.haemers.events.SpriteEvent;
	
	/**
	 * @author Jonathan Haemers
	*/
	public class BaseSlider extends BaseSprite
	{
		public var mcThumb			:BaseMovieClip;
		public var mcTrack			:BaseMovieClip;
		
		protected var _maximum		:Number;
		protected var _minimum		:Number;
		protected var _value		:Number;
		
		
		public function BaseSlider() 
		{
			super();
		}
		
		/** Public methods **/
		public function show() : void
		{
			
		}
		
		public function hide() : void
		{
			
		}
		
		/** Getters & Setters **/
		public function get maximum() : Number
		{ 
			return _maximum;
		}
		public function set maximum( value:Number ) : void 
		{
			_maximum = value;
		}
		
		public function get minimum() : Number
		{ 
			return _minimum;
		}
		public function set minimum( value:Number ) : void 
		{
			_minimum = value;
		}
		
		public function get value() : Number
		{ 
			return _value;
		}
		public function set value( value:Number ) : void 
		{
			_value = value;
		}
		
		/** Protected methods **/
		override protected function init(e:Event = null) : void
		{
			super.init(e);
			startup();
		}
		
		protected function startup() : void
		{
			mcThumb = new Draggable(mcThumb, true, new Rectangle(mcTrack.x, mcTrack.y, mcTrack.width, mcTrack.height)).target as BaseMovieClip;
			
			configListeners();
		}
		
		protected function configListeners() : void
		{
			
		}
		
		/** Abstract methods **/
		protected function showComplete() : void
		{
			//dispatch(new SpriteEvent(SpriteEvent.SHOW_COMPLETE));
		}
		
		protected function hideCompleteHandler() : void
		{
			//dispatch(new SpriteEvent(SpriteEvent.HIDE_COMPLETE));
		}
		/** Private methods **/
		
	}

}